<template>
  <div>
    <page-list :x-uri="uri" :doactions="doactions" :custom-components="customComponents" :checkbox-item="false">
      <!-- 自定义tab -->
      <template v-slot:page-tabs>
        <tabs :tabs="tabs" />
        <page-header content="活动报表" />
      </template>
    </page-list>
  </div>
</template>
<script>
import PageList from '@public/template/page_list.vue';
import Tabs from '../../tabs';
import PageHeader from '@/components/page-header';
// import Price from './components/price.vue';
import Nums from './components/number.vue';
import Status from './components/status.vue';
export default {
  components: {
    PageList,
    Tabs,
    PageHeader
  },
  data() {
    return {
      uri: '/admin/promotion/tuan/' + this.$route.params.id + '/report',
      tabs: [
        {
          title: '活动报表',
          uri: '/promotion/tuan/' + this.$route.params.id + '/report',
          meta: {
            permission: 'market.promotion.tuan.report'
          }
        }
      ],
      customComponents: {
        number: Nums,
        // price: Price,
        // remain_price: RemainPrice,
        status: Status
      },
      doactions: [{ title: '详情', meta: { permission: 'market.promotion.tuan.report' }, callback: this.info }]
    };
  },
  methods: {
    info: function({ row }) {
      // 详情
      this.$router.push({ path: '/promotion/tuan/' + row.id + '/report/' + row.id + '/info' });
    }
  }
};
</script>
